﻿#ifndef ONEGIS_PSDE_DATASOURCE_IC_SOBJECTCLASS_H
#define ONEGIS_PSDE_DATASOURCE_IC_SOBJECTCLASS_H

#include <memory>
#include "libengine.h"
#include "PbFormatData.pb.h"

using namespace onegis::protobuf::model;

namespace onegis {
namespace psde {
namespace datasource {

class LIBENGINE_API IC_SObjectClass
{
public:
    virtual ~IC_SObjectClass() {}

    /* 新增 SObject 数据（包括增、删、该操作） */
    virtual bool save(const PbSObjects &objects, PbResponseResult &response, bool useIdStrategy = false) = 0;

    /* 查询 SObject 数据 */
    virtual bool query(const PbSpatialFilter &filter, PbResponseResult &response) = 0;

    /* 设置进度回调函数和自定义参数 */
    virtual void setProgressCallBack(ProgressCallBackPTR callback, void *p) = 0;

};

typedef std::tr1::shared_ptr<IC_SObjectClass> SObjectClassPtr;

}
}
}

#endif
